import Vue from 'vue';
import Router from 'vue-router';
import login from '../page/login';                        //登录
import register from '../page/register';                  //注册
import notice from '../page/notice';                      //公告
import noticeDetail from '../page/noticeDetail';          //公告详情
import userCenter from '../page/userCenter';              //个人中心
import coinmanage from '../page/coinmanage';              //金币管理
import turnout from '../page/turnout';              //金币转出
import upgrade from '../page/upgrade';              //我要升级
import shenhe from '../page/shenhe';              //升级审核
import huiyuan from '../page/huiyuan';              //会员管理
import password from '../page/password';              //密码
import xiugai from '../page/xiugai';              //修改密码
import feedback from '../page/feedback';              //信息反馈
import feedbackLog from '../page/feedbackLog';              //信息反馈列表
import logDetail from '../page/logDetail';              //信息反馈列表
import hierarchy from '../page/hierarchy';              //会员层级
import recharge from '../page/recharge';                //充值
import clause from '../page/clause';                   //条款
import huifu from '../page/huifu';                   //回复





Vue.use(Router);


export default new Router({
	mode: 'history',
	base: '/',
	routes: [
		{
			path: '/recharge',
			component: recharge,
			name: 'recharge'
		},{
			path: '/',
			component: login,
			name: 'login'
		},{
			path: '/login',
			component: login,
			name: 'login'
		},{
			path: '/register',
			component: register,
			name: 'register'
		},{
			path: '/notice',
			component: notice,
			name: 'notice'
		},{
			path: '/noticeDetail',
			component: noticeDetail,
			name: 'noticeDetail'
		},{
			path: '/userCenter',
			component: userCenter,
			name: 'userCenter'
		},{
			path: '/coinmanage',
			component: coinmanage,
			name: 'coinmanage'
		},{
			path: '/turnout',
			component: turnout,
			name: 'turnout'
		},{
			path: '/upgrade',
			component: upgrade,
			name: 'upgrade'
		},{
			path: '/shenhe',
			component: shenhe,
			name: 'shenhe'
		},{
			path: '/huiyuan',
			component: huiyuan,
			name: 'huiyuan'
		},{
			path: '/password',
			component: password,
			name: 'password'
		},{
			path: '/xiugai',
			component: xiugai,
			name: 'xiugai'
		}, {
			path: '/feedback',
			component: feedback,
			name: 'feedback'
		}, {
			path: '/feedbackLog',
			component: feedbackLog,
			name: 'feedbackLog'
		}, {
			path: '/logDetail',
			component: logDetail,
			name: 'logDetail'
		}, {
			path: '/hierarchy',
			component: hierarchy,
			name: 'hierarchy'
		}, {
			path: '/clause',
			component: clause,
			name: 'clause'
		}, {
			path: '/huifu',
			component: huifu,
			name: 'huifu'
		}
	],
	scrollBehavior(to, from, savedPosition) {
		if (savedPosition) {
			return savedPosition;
		} else {
			document.scrollingElement.scrollTop = 0;
		}
	}
});